package com.google.jessewilson.codesearch;

import com.google.jessewilson.codesearch.api.SearchProvider;
import com.google.jessewilson.codesearch.commandlinesearch.ClsSearchProvider;
import com.google.jessewilson.codesearch.googlecodesearch.GcsSearchProvider;
import com.google.jessewilson.codesearch.gtagssearch.GtagsSearchProvider;

import java.util.Arrays;
import java.util.List;

/**
 * This is the only class that contains a reference to the complete
 * set of search providers. It allows us to swap-out different sets
 * of search providers for custom builds of the plugin.
 *
 * @author jessewilson
 */
public class SearchProviders {

  /**
   * Returns all search providers for this configuration.
   * The first returned {@link SearchProvider} will be enabled by
   * default, and all others disabled.
   */
  public List<SearchProvider> getAll() {
    return Arrays.asList(
        new GcsSearchProvider(),
        new ClsSearchProvider(),
        new GtagsSearchProvider()
    );
  }
}
